//
//  RequestSvc.swift
//  goHomeSleep
//
//  Created by jiaxu on 16/6/27.
//  Copyright © 2016年 jiaxu. All rights reserved.
//

import Foundation
import Alamofire

class RequestSvc {
    let SvcUrl: String = "http://test.a.yoyosports.cn:1115/"
    
    /*
        请求服务器信息
        author:JiaXu
        date:2016/06/27
    */
    func _request(reqUrl: String, reqData: [String : AnyObject], Handler: (NSDictionary?, NSError?) -> ()) -> Void {
        print("req_path : " + reqUrl);
        print(reqData);
        let reqUrl = SvcUrl + reqUrl;
        Alamofire.request(.POST, reqUrl, parameters: reqData)
            .responseJSON { response in
                Handler(response.result.value as! NSDictionary, nil)
        }
    }
}